/*
 * @Author: 管哥哥 1729207740@qq.com
 * @Date: 2025-08-13 15:58:54
 * @LastEditors: 管哥哥 1729207740@qq.com
 * @LastEditTime: 2025-09-12 16:57:44
 * @FilePath: \web\src\main.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import '@/assets/css/main.css'
import { directive } from '@/utils/directive'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

const app = createApp(App)
const pinia = createPinia()

import emitter from '@/utils/emitter'
app.config.globalProperties.EventBus = emitter; //全局事件总线
app.use(pinia)
app.use(router)
app.use(Antd)
app.use(ElementPlus)
// 预加载信息配置
import { useInfoStore } from '@/stores/info'
const infoStore = useInfoStore()
infoStore.loadInfoConfig()

app.mount('#app')
directive(app)